<template>
	<view class="header">
		<view class="bg"></view>
		<view class="card">
			<text class="title">{{title}}</text>
			<text user-select class="sub-title">{{subTitle}}</text>
		</view>
	</view>
</template>

<script setup>
	defineProps({
		title: String,
		subTitle: String
	})
</script>

<style scoped lang="scss">
	.header {
		position: relative;
		z-index: 0;
		display: flex;
		padding: 0 12px;
		flex-direction: column;

		.bg {
			z-index: -1;
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 30%;
			background: #FF7F27;
			border-bottom-left-radius: 12px;
			border-bottom-right-radius: 12px;
		}

		.card {
			display: flex;
			flex-direction: column;
			background: white;
			border-radius: 8px;
			row-gap: 12px;
			padding: 12px;
			box-sizing: border-box;

			.title {
				color: #222;
				font-size: 22px;
			}

			.sub-title {
				color: #444;
				font-size: 16px;
			}
		}
	}
</style>
